/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.knezevic.realestate.util;

import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Nemanja
 */
public class Formats {

    private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");

    public static Date parseDate(String strDate) {
        Date date = null;
        try {
            date = simpleDateFormat.parse(strDate);
        } catch (ParseException ex) {
            throw new RuntimeException(ex);
        }
        return date;
    }
    
    public static Format getDateFormat() {
        return simpleDateFormat;
    }
}
